
import { MongooseFactory } from "../kalend";
import { Schema } from "mongoose";

/**商户申请酒水表 */
const schema = MongooseFactory.Schema({
  merchantname: {
    type: String
  },
  //商户
  merchantid: {
    type: Schema.Types.ObjectId,
    ref: "merchant"
  },

  winelist: [{
    wineid: String,
    count: Number
  }],
  totalcount: {
    type: Number
  },
  //所属品牌大使
  AgentId: {
    type: String
  },
  //审核状态
  AuditStatus: {
    type: Number,
    default: 0
  },

  //送酒状态
  SendStatus: {
    type: Number,
    default: 0
  },
  createuser: {
    type: Schema.Types.ObjectId,
    ref: "platform_user"
  },
  modifyuser: {
    type: Schema.Types.ObjectId,
    ref: "platform_user"
  },
  modifytime: {
    type: Date
  },
});



export const merchantApplyWineRecordsModel = MongooseFactory.Model("merchantApplyWineRecords", schema);